eval — Evaluate expression


\begin{rail}
Eval : 'eval' '(' String ')' ;
\end{rail}
eval is a way to make up commands and functions at execution time. You do not gain much by using this function during an interactive session, however it can be very useful when called from a script. The expression contained in the string argument is evaluated without regard to local functions. Essentially what occurs is equivalent to replacing the eval function with the contents of the string in a global context. Any assignments or variable modifications will effect the global symbol table only. eval does not have any knowledge of local variables. Thus if you use eval within a user-defined function, you must be careful not to reference that function's arguments or local variables. $\Longrightarrow$ This is not an built-in function. This function is normally loaded on start-up from the eval.r file in the standard rlib directory. Use of the -r option, incorrectly setting the RLAB_LIB_DIR environmental variable, or modifying eval.r may make this function unavailable.

Subsections